import { IFeidaoAiBrowserComponent } from '@dfeidao/atom-web/interfaces';
import nodejs from '@dfeidao/atom-web/msg/nodejs';
import render from '@dfeidao/atom-web/render/render';
import p001 from './p001';
import p005 from './p005';

export default async function a004(fd: IFeidaoAiBrowserComponent) {
	// todo

	const s = fd.data.node.querySelector<HTMLDivElement>('[data-feidao-presentation="p003"]');
	const s1 = fd.data.node.querySelector<HTMLDivElement>('[data-feidao-presentation="p005"]');
	const staff_name = fd.data.node.querySelector<HTMLInputElement>('[data-id="staff_name"]').value;
	const res = await nodejs<{ res: Array<{}>; s: Array<{}> }>('meeting-management/zj-000007/s002', {
		staff_name,
		pn: 1
	});
	console.log(s);
	
	render(fd, res.res, p001, 'p001', 'inner');
	if (res.s.length > 5) {
		s1.style.display = 'block';
		s.style.display = 'none';
	render(fd, res.s.length, p005, 'p005', 'inner');

	}
}
